package com.wlhse.controller;

import com.wlhse.dto.inDto.LoginIPadInDto;
import com.wlhse.service.UserPingService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController("UserPingController")
@RequestMapping("/api/v1")
public class UserPingController {
    @Resource
    private UserPingService userPingService;

    @RequestMapping(value = "/anzhuo2", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
    public String PingLogin(@RequestBody(required = false) LoginIPadInDto loginIPadInDto, HttpServletRequest request) {
        return userPingService.login(loginIPadInDto.getuName(), loginIPadInDto.getPwd(), request);
    }
}
